package com.bailan.foreat.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author ste
 * @since 2023-02-21 07:50:43
 */
@Data
@TableName("t_order")
public class Order {

    /**
     * 订单id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单号(woniuCY + getTime)
     */
    @TableField("order_num")
    private String orderNum;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 地址id
     */
    @TableField("address_id")
    private Integer addressId;

    /**
     * 状态(0未⽀付 1已支付 2已取消)
     */
    @TableField("status")
    private Integer status;

    /**
     * 总价
     */
    @TableField("total_price")
    private BigDecimal totalPrice;

    /**
     * 退款理由(暂时废弃)
     */
    @TableField("refund_reason")
    private String refundReason;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;


}
